import request from '@/utils/request';

// 分页查询业务明细列表
export function queryBusinessDetailListPage(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/detail/queryBusinessDetailListPage',
		method: 'post',
		data: data,
	});
}

// 下载业务明细列表
export function exportBusinessDetailList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/detail/exportBusinessDetailList',
		method: 'post',
		data: data,
		responseType: 'blob',
	});
}

// 根据详单id查询业务详情
export function queryBusinessDetailByDetailId(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/detail/queryBusinessDetailByDetailId',
		method: 'post',
		data: data,
	});
}

// 分页查询业务步骤列表
export function queryBusinessStepListPage(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/detail/queryBusinessStepListPage',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询步骤端到端关联
export function stepEndToEndRelation(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/detail/stepEndToEndRelation',
		method: 'post',
		data: data,
		timeout: 120000,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询端到端节点详情
export function queryEndToEndDetail(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/detail/queryEndToEndDetail',
		method: 'post',
		data: data,
	});
}

// 修改网端坐标
export function updateSegmentPosition(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/detail/updateSegmentPosition',
		method: 'post',
		data: data,
	});
}

// 获取网络信息
export function queryNetworkDetailList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/detail/queryNetworkDetail',
		method: 'post',
		data: data,
	});
}
